<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>登录</title>

    <!--Favicon -->
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>

    <!--Bootstrap.min css-->
    <link rel="stylesheet" href="css/bootstrap.min.css">

</head>

<body>

<div id="login" class="container" style="padding-top:100px">
    <div class="row clearfix">
        <div class="col-md-4 column"></div>
        <div class="col-md-2 column">
            <label>用户名</label>
        </div>
        <div class="col-md-2 column">
            <input type="email" name="mail" v-model="User" placeholder="用户名">
        </div>
        <div class="col-md-4 column"></div>

    </div>

    <div class="row clearfix">
        <div class="col-md-4 column"></div>
        <div class="col-md-2 column">
            <label>密码</label>
        </div>
        <div class="col-md-2 column">
            <input type="password" name="password" v-model="Pwd" placeholder="密码">

        </div>
        <div class="col-md-4 column"></div>

    </div>
    <div class="row clearfix">
        <div class="col-md-4 column"></div>
        <div class="col-md-2 column">
            <a class="btn btn-primary btn-block" href="#" v-on:click="login">Login</a>
        </div>
        <div class="col-md-2 column">
            <a class="btn btn-primary btn-block" href="/signup.html" >Signup</a>
        </div>
        <div class="col-md-4 column"></div>

    </div>


</div>

<!--Jquery.min js-->
<script src="js/jquery.min.js"></script>


<!--Bootstrap.min js-->
<script src="js/bootstrap.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="js/webchat.js"></script>
<script>

			var g_svr="http://localhost:8083"
			var User={
				User:"",
				Pwd:""
			}

      function dologin(){
        webchat.login(User.User,User.Pwd,function(){
            User.Pwd="";
        });
      }
			new Vue({
				el: '#login',
				data: User,
				methods:{
					login:function () {
						dologin();
					},
					signup:function(){
					}
				}
				});
        function calAge(ev){
          var evt = window.event || e;
          if (evt.keyCode == 13) {
            dologin();
          }
        }

</script>


</body>
</html>